package day09;


import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.Arrays;

public class ioStreamPrc01 {
    public static void main(String[] args) throws IOException {
        File file=new File("G:\\ready");
        File[] files = file.listFiles();
        System.out.println(Arrays.toString(files));
        System.out.println(file.isDirectory());//true
        System.out.println(file.isFile());//false
        File f1=new File("G:\\ready\\1.txt");
        System.out.println(f1.isFile());//true
        System.out.println(f1.getName());
        System.out.println(f1.getAbsolutePath());
        System.out.println(f1.getCanonicalPath());
        System.out.println(f1.getParentFile());
        file=new File("G:\\ready\\b\\b\\c");
        System.out.println(file.mkdirs());
        System.out.println(file.getPath());
        file=new File("G:\\ready\\b\\b\\c");
        System.out.println(file.delete());
        System.out.println(file.getPath());
        File file1=new File("G:\\ready");
        String[] list = file1.list();
        System.out.println(Arrays.toString(list));
        System.out.println(list[0]);
        File[] f=file1.listFiles();
        System.out.println(Arrays.toString(f));
        System.out.println(f[0]);
    }
}
